package com.ncu.sprotapp.vo;

import lombok.Data;

@Data
public class JsonResult {
    private int id;
    private String message;
    private Object data;

    public JsonResult(int id, String message, Object data) {
        this.id = id;
        this.message = message;
        this.data = data;
    }

    public static JsonResult success(Object data){
        return new JsonResult(10000,"成功",data);
    }

    public static JsonResult fail(String message){
        return new JsonResult(502,message,null);
    }
}
